<?php
/* @var $this SiteController
 *  @var $gpsSpeedList */

$this->pageTitle=Yii::app()->name;
?>

<?php

// echo "Max speed ". max($gpsDataList);

// $gpsDataList['timeElapsed'] = array_unique($gpsDataList['timeElapsed']);

$this->widget(
		'chartjs.widgets.ChLine',
		array(
				'width' => 3140,
				'height' => 1200,
				'htmlOptions' => array(),
				'labels' => $gpsDataList['timeElapsed'],
				'datasets' => array(
						array(
								"fillColor" => "rgba(220,220,220,0.5)",
								"strokeColor" => "#004AFF",
								"pointColor" => "rgba(220,220,220,1)",
								"pointStrokeColor" => "#0094FF",
								"data" => $gpsDataList['speeds'],
						),
						array(
								"fillColor" => "rgba(220,220,220,0.5)",
								"strokeColor" => "#FF0071",
								"pointColor" => "rgba(220,220,220,1)",
								"pointStrokeColor" => "#ffffff",
								"data" => $fitSpeedList
						)
				),
				'options' => array(
					"pointDotRadius" => 0.3,
// 					"scaleStepWidth" =>10,
						"pointDot"=> false,
						"bezierCurve" => false,
				)
		)
);
?>


<?php
echo "<pre>";
// print_r($data);
echo "</pre>";
if(false) {

?>



<p>You may change the content of this page by modifying the following two files:</p>

<ul>
    <li>View file: <code><?php echo __FILE__; ?></code></li>
    <li>Layout file: <code><?php echo $this->getLayoutFile('main'); ?></code></li>
</ul>

<p>For more details on how to further develop this application, please read
    the <a href="http://www.yiiframework.com/doc/">documentation</a>.
    Feel free to ask in the <a href="http://www.yiiframework.com/forum/">forum</a>,
    should you have any questions.</p>
<?php
}
?>